#ifndef __GfxDriver_VertexStreamDecl_h__
#define __GfxDriver_VertexStreamDecl_h__

#include "Core/BasicTypes.h"

#include "GfxDriver/VertexElement.h"
#include <vector>

namespace Orca {

	class VertexBuffer;

	//-----------------------------------------------------------------------------
	class VertexStreamDecl {

	public:
		VertexBuffer *mVBuf;
		uint32 mOffsetInBytes;
		uint32 mStride;

		typedef std::vector<VertexElement> TElemetList;
		typedef TElemetList::iterator TElementIter;

		TElemetList mElems;

		VertexStreamDecl(
			  VertexBuffer *vbuf
			, uint32 offsetInBytes
			, uint32 stride);

		~VertexStreamDecl();

		void appendElement(const VertexElement &elem);
		VertexStreamDecl& operator << (const VertexElement &elem);

		void reset();

	private:
		uint32 mOffset;
	};

}

#endif	// __GfxDriver_VertexStreamDecl_h__